package com.lujieni.springbootmybatis.controller.admin;

import com.lujieni.springbootmybatis.dao.WebsiteMsgDao;
import com.lujieni.springbootmybatis.po.WebsiteMsgDO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author：Jie Ni
 * @Date: 2025/11/14 14:21
 * @Description:
 */
@RestController
@RequestMapping("/websiteMsg")
@RequiredArgsConstructor
public class WebsiteMsgController {

    private final WebsiteMsgDao websiteMsgDao;

    @PostMapping("/insert")
    public void insert(@RequestBody WebsiteMsgDO websiteMsgDO) {
        websiteMsgDao.insert(websiteMsgDO);
    }

    @GetMapping("/all")
    public List<WebsiteMsgDO> all() {
        return websiteMsgDao.selectList(null);
    }


}
